#include <iostream>
#include <algorithm>

using namespace std;

const int N = 1e4 + 10;
struct node{
	double x, y;
}a[N];
int n;

int main()
{
	cin >> n;
	for(int i = 1; i <= n; i++) cin >> a[i].x >> a[i].y;
	double ret = 1e9;
	for(int i = 1; i <= n; i++)
	{
		for(int j = 1; j <= n; j++)
		{
			if(i == j) continue;
			double x1 = a[i].x, y1 = a[i].y;
			double x2 = a[j].x, y2 = a[j].y;
			double x = abs(x2 - x1), y = abs(y2 - y1);
			ret = min(ret, sqrt(x * x + y * y));
		}
	}
	printf("%.4f", ret);
	return 0;
} 
